Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@drovp/types
Advanced tools
This package contains type definitions for Drovp plugin API (https://github.com/drovp/drovp).
npm install --save-dev @drovp/types
The documentation is at drovp.app/docs/typing.
Types are intended to be imported in:
main.ts
(plugin)import {Plugin, PayloadData, makeOptionsSchema, makeAcceptsFlags} from '@drovp/types';
type Options = {
bulkItems: boolean;
allowFiles: boolean;
fileTypes: string[];
};
const schema = makeOptionsSchema<Options>()([
{name: 'bulkItems', type: 'boolean'},
{name: 'allowFiles', type: 'boolean'},
{
name: 'fileTypes',
type: 'select',
default: [],
options: ['jpg', 'png', 'gif'],
isHidden: (value, options) => options.allowFiles,
},
]);
const accepts = makeAcceptsFlags<Options>()({
files: (item, options) => options.allowFiles && options.fileTypes.includes(item.type),
});
export type Payload = PayloadData<Options, typeof config>;
// Omit if no dependencies
export interface Dependencies {
ffmpeg: string;
}
export default (plugin: Plugin) => {
plugin.registerProcessor<Payload>('foo', {
main: 'dist/processor.js',
dependencies: ['@drovp/ffmpeg:ffmpeg'],
accepts: accepts,
options: schema,
bulkItems: (items, options) => options.bulkItems,
});
};
processor.ts
import type {ProcessorUtils} from '@drovp/types';
import type {Payload, Dependencies} from './';
export default async (payload: Payload, utils: ProcessorUtils<Dependencies>) => {
console.log(payload); // ItemFile(s), profile options, and extra data if any
console.log(utils.dependencies.ffmpeg); // path to ffmpeg binary
};
FAQs
Drovp plugin API definitions
We found that @drovp/types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.